const mongoose = require('mongoose')

mongoose.connect('mongodb+srv://3047352306:i6mvPG6Ljr0zfmBP@cluster0.etjxk.mongodb.net/')

const con = mongoose.connection

con.on('open', () => {
    console.log('数据库连接成功') 
})

con.on('error', (err) => {
    console.log('数据库连接失败的原因', err)
})

module.exports = mongoose